package com.gupao.jly521.delegate;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Jly
 * @date 2018/9/3  15:19
 */
public class Leader implements IStaff{

    private Map<String ,IStaff> jobMap = new HashMap<>();

    public Leader() {
        jobMap.put("jobA",new StaffA());
        jobMap.put("jobB",new StaffB());
    }

    @Override
    public void doMyJob(String command) {
        jobMap.get(command).doMyJob(command);
    }
}
